Import('memcachedEnv')
Import('mcoreLibrary')
Import('mtmLibrary')
Import('pmallocLibrary')

myEnv = memcachedEnv.Clone() 
myEnv.Append(CCFLAGS = ' -D_GNU_SOURCE -DHAVE_CONFIG_H')
myEnv['CPPPATH'] = []
myEnv.Append(CPPPATH = ['#bench/memcached/memcached-1.2.4-base'])

#myEnv.Append(CPPPATH = myEnv['EXPLICIT_DEPENDENCY']['BDB_INCLUDE'] )
#myEnv.Append(LINKFLAGS = '-Wl,--whole-archive %s -Wl,--no-whole-archive' % myEnv['EXPLICIT_DEPENDENCY']['BDB_LIB'])


sources = Split("""
		   assoc.c
		   items.c
		   memcached.c
		   slabs.c
		   stats.c
		   thread.c
                   """)


myEnv.Append(LIBS = ['event'])
myEnv.Program('memcached', sources)
